\hypertarget{classduye_1_1_file}{\section{duye\-:\-:File Class Reference}
\label{classduye_1_1_file}\index{duye\-::\-File@{duye\-::\-File}}
}


{\ttfamily \#include $<$duye\-\_\-file.\-h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classduye_1_1_file_a9999a029c46f05f68bbe8f684ba95f44}{File} (const int8 $\ast$file\-Path)
\begin{DoxyCompactList}\small\item\em set file path \end{DoxyCompactList}\item 
bool \hyperlink{classduye_1_1_file_a64b2260fee54b9e6a7640bc0e5ef0309}{open} (const int file\-Open\-Flags)
\begin{DoxyCompactList}\small\item\em open file for reading \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_file_a99ecad8efc5b11cd56c238217ded58f3}{bool {\bfseries open} (const int8 $\ast$file\-Path, const int file\-Open\-Flags)}\label{classduye_1_1_file_a99ecad8efc5b11cd56c238217ded58f3}

\item 
bool \hyperlink{classduye_1_1_file_a00e2932036cff87bf4ab163a94936a90}{open} (const int file\-Open\-Flags, const int32 file\-Open\-Mode)
\begin{DoxyCompactList}\small\item\em open file for reading \end{DoxyCompactList}\item 
\hypertarget{classduye_1_1_file_ae5c031d6008a4637ac15768f59afec62}{bool {\bfseries open} (const int8 $\ast$file\-Path, const int file\-Open\-Flags, const int32 file\-Open\-Mode)}\label{classduye_1_1_file_ae5c031d6008a4637ac15768f59afec62}

\item 
bool \hyperlink{classduye_1_1_file_aa291998f5ffd97af16a7b0de3fe5db3b}{close} ()
\begin{DoxyCompactList}\small\item\em close file \end{DoxyCompactList}\item 
uint64 \hyperlink{classduye_1_1_file_ad44d9f6dd81c0bb5e9a9df59f28e6d65}{size} ()
\begin{DoxyCompactList}\small\item\em get file size \end{DoxyCompactList}\item 
int64 \hyperlink{classduye_1_1_file_a09e72a10dd764e7c7a91a1ede699822f}{seek} (const int64 offset, const File\-Seek\-Flags \&flags=D\-\_\-\-S\-E\-E\-K\-\_\-\-B\-E\-G)
\begin{DoxyCompactList}\small\item\em set file seek \end{DoxyCompactList}\item 
int64 \hyperlink{classduye_1_1_file_ac6fcba569be2065d8b41c80471e2280b}{tell} ()
\begin{DoxyCompactList}\small\item\em get file pointer offset from header \end{DoxyCompactList}\item 
int64 \hyperlink{classduye_1_1_file_ac76de1b8d839f3317427a1fc80f288a2}{read} (int8 $\ast$buffer, const uint64 \hyperlink{classduye_1_1_file_ad44d9f6dd81c0bb5e9a9df59f28e6d65}{size})
\begin{DoxyCompactList}\small\item\em read file \end{DoxyCompactList}\item 
int64 \hyperlink{classduye_1_1_file_a78f0fdbe2a1f8fe814f66a3bcdf30484}{write} (const int8 $\ast$data, const uint64 length)
\begin{DoxyCompactList}\small\item\em write file \end{DoxyCompactList}\item 
uint8 $\ast$ \hyperlink{classduye_1_1_file_a116729cef62855059b90cfbb8f1add46}{error} ()
\begin{DoxyCompactList}\small\item\em get last error string \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
file operation wrapper 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classduye_1_1_file_a9999a029c46f05f68bbe8f684ba95f44}{\index{duye\-::\-File@{duye\-::\-File}!File@{File}}
\index{File@{File}!duye::File@{duye\-::\-File}}
\subsubsection[{File}]{\setlength{\rightskip}{0pt plus 5cm}duye\-::\-File\-::\-File (
\begin{DoxyParamCaption}
\item[{const int8 $\ast$}]{file\-Path}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [explicit]}}}\label{classduye_1_1_file_a9999a029c46f05f68bbe8f684ba95f44}


set file path 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em file\-Path} & \-: file path \\
\hline
\end{DoxyParams}
\begin{DoxyNote}{Note}

\end{DoxyNote}


\subsection{Member Function Documentation}
\hypertarget{classduye_1_1_file_aa291998f5ffd97af16a7b0de3fe5db3b}{\index{duye\-::\-File@{duye\-::\-File}!close@{close}}
\index{close@{close}!duye::File@{duye\-::\-File}}
\subsubsection[{close}]{\setlength{\rightskip}{0pt plus 5cm}bool duye\-::\-File\-::close (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_file_aa291998f5ffd97af16a7b0de3fe5db3b}


close file 

\begin{DoxyReturn}{Returns}
true/false 
\end{DoxyReturn}
\begin{DoxyNote}{Note}

\end{DoxyNote}
\hypertarget{classduye_1_1_file_a116729cef62855059b90cfbb8f1add46}{\index{duye\-::\-File@{duye\-::\-File}!error@{error}}
\index{error@{error}!duye::File@{duye\-::\-File}}
\subsubsection[{error}]{\setlength{\rightskip}{0pt plus 5cm}uint8$\ast$ duye\-::\-File\-::error (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_file_a116729cef62855059b90cfbb8f1add46}


get last error string 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt out}  & {\em error} & \-: output buffer \\
\hline
\mbox{\tt in}  & {\em size} & \-: output buffer size \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true/false 
\end{DoxyReturn}
\begin{DoxyNote}{Note}

\end{DoxyNote}
\hypertarget{classduye_1_1_file_a64b2260fee54b9e6a7640bc0e5ef0309}{\index{duye\-::\-File@{duye\-::\-File}!open@{open}}
\index{open@{open}!duye::File@{duye\-::\-File}}
\subsubsection[{open}]{\setlength{\rightskip}{0pt plus 5cm}bool duye\-::\-File\-::open (
\begin{DoxyParamCaption}
\item[{const int}]{file\-Open\-Flags}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_file_a64b2260fee54b9e6a7640bc0e5ef0309}


open file for reading 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em file\-Path} & \-: file full path \\
\hline
\mbox{\tt in}  & {\em file\-Open\-Flags} & \-: open mode flags, from type Open\-Flags \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true/false 
\end{DoxyReturn}
\begin{DoxyNote}{Note}

\end{DoxyNote}
\hypertarget{classduye_1_1_file_a00e2932036cff87bf4ab163a94936a90}{\index{duye\-::\-File@{duye\-::\-File}!open@{open}}
\index{open@{open}!duye::File@{duye\-::\-File}}
\subsubsection[{open}]{\setlength{\rightskip}{0pt plus 5cm}bool duye\-::\-File\-::open (
\begin{DoxyParamCaption}
\item[{const int}]{file\-Open\-Flags, }
\item[{const int32}]{file\-Open\-Mode}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_file_a00e2932036cff87bf4ab163a94936a90}


open file for reading 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em file\-Path} & \-: file full path \\
\hline
\mbox{\tt in}  & {\em file\-Open\-Flags} & \-: open mode flags, from type Open\-Flags \\
\hline
\mbox{\tt in}  & {\em file\-Open\-Mode} & \-: permission \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true/false 
\end{DoxyReturn}
\begin{DoxyNote}{Note}

\end{DoxyNote}
\hypertarget{classduye_1_1_file_ac76de1b8d839f3317427a1fc80f288a2}{\index{duye\-::\-File@{duye\-::\-File}!read@{read}}
\index{read@{read}!duye::File@{duye\-::\-File}}
\subsubsection[{read}]{\setlength{\rightskip}{0pt plus 5cm}int64 duye\-::\-File\-::read (
\begin{DoxyParamCaption}
\item[{int8 $\ast$}]{buffer, }
\item[{const uint64}]{size}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_file_ac76de1b8d839f3317427a1fc80f288a2}


read file 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt out}  & {\em buffer} & \-: output buffer \\
\hline
\mbox{\tt in}  & {\em size} & \-: the size of buffer \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
size/-\/1 
\end{DoxyReturn}
\begin{DoxyNote}{Note}

\end{DoxyNote}
\hypertarget{classduye_1_1_file_a09e72a10dd764e7c7a91a1ede699822f}{\index{duye\-::\-File@{duye\-::\-File}!seek@{seek}}
\index{seek@{seek}!duye::File@{duye\-::\-File}}
\subsubsection[{seek}]{\setlength{\rightskip}{0pt plus 5cm}int64 duye\-::\-File\-::seek (
\begin{DoxyParamCaption}
\item[{const int64}]{offset, }
\item[{const File\-Seek\-Flags \&}]{flags = {\ttfamily D\-\_\-SEEK\-\_\-BEG}}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_file_a09e72a10dd764e7c7a91a1ede699822f}


set file seek 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em offset} & \-: offset \\
\hline
\mbox{\tt in}  & {\em flags} & \-: D\-\_\-\-S\-E\-E\-K\-\_\-\-B\-E\-G, D\-\_\-\-S\-E\-E\-K\-\_\-\-C\-U\-R, D\-\_\-\-S\-E\-E\-K\-\_\-\-E\-N\-D \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
offset/false 
\end{DoxyReturn}
\begin{DoxyNote}{Note}

\end{DoxyNote}
\hypertarget{classduye_1_1_file_ad44d9f6dd81c0bb5e9a9df59f28e6d65}{\index{duye\-::\-File@{duye\-::\-File}!size@{size}}
\index{size@{size}!duye::File@{duye\-::\-File}}
\subsubsection[{size}]{\setlength{\rightskip}{0pt plus 5cm}uint64 duye\-::\-File\-::size (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_file_ad44d9f6dd81c0bb5e9a9df59f28e6d65}


get file size 

\begin{DoxyReturn}{Returns}
size 
\end{DoxyReturn}
\begin{DoxyNote}{Note}

\end{DoxyNote}
\hypertarget{classduye_1_1_file_ac6fcba569be2065d8b41c80471e2280b}{\index{duye\-::\-File@{duye\-::\-File}!tell@{tell}}
\index{tell@{tell}!duye::File@{duye\-::\-File}}
\subsubsection[{tell}]{\setlength{\rightskip}{0pt plus 5cm}int64 duye\-::\-File\-::tell (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_file_ac6fcba569be2065d8b41c80471e2280b}


get file pointer offset from header 

\begin{DoxyReturn}{Returns}
offset from file header 
\end{DoxyReturn}
\begin{DoxyNote}{Note}

\end{DoxyNote}
\hypertarget{classduye_1_1_file_a78f0fdbe2a1f8fe814f66a3bcdf30484}{\index{duye\-::\-File@{duye\-::\-File}!write@{write}}
\index{write@{write}!duye::File@{duye\-::\-File}}
\subsubsection[{write}]{\setlength{\rightskip}{0pt plus 5cm}int64 duye\-::\-File\-::write (
\begin{DoxyParamCaption}
\item[{const int8 $\ast$}]{data, }
\item[{const uint64}]{length}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_file_a78f0fdbe2a1f8fe814f66a3bcdf30484}


write file 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em buffer} & \-: input buffer \\
\hline
\mbox{\tt in}  & {\em size} & \-: the size of buffer \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
size/-\/1 
\end{DoxyReturn}
\begin{DoxyNote}{Note}

\end{DoxyNote}


The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
Z\-:/duye/src/duyebase/system/\hyperlink{duye__file_8h}{duye\-\_\-file.\-h}\end{DoxyCompactItemize}
